'use strict';

module.exports = app => {
  const mongoose = app.mongoose;
  const CitySchema = new mongoose.Schema({
    name: {
      type: String,
      required: true,
    },
    totalPopulation: {
      type: Number,
      required: true,
    },
    country: String,
    zipCode: Number,
    updated: {
      type: Date,
      default: Date.now,
    },
  });

  return mongoose.model('City', CitySchema);
};
